package com.ccrfid.rmc6.service.sys;

import com.ccrfid.rmc6.appconfig.exception.pojo.AppException;
import com.ccrfid.rmc6.entity.sys.UploadFileEntity;
import com.ccrfid.rmc6.repository.search.SearchCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;

public interface UploadFileService {

    Page<UploadFileEntity> searchFile(SearchCriteria criteria, Pageable pageable);

    UploadFileEntity uploadFile(String fileName, InputStream inputStream, String userAccount, String clientIp) throws IOException;

    File downloadFile(Long fileId) throws AppException;

    File downloadFile(String fileName) throws AppException;

    void deleteFiles(List<Long> idList);

}
